﻿//Sahaj

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
//Sahaj, Abhishek

using FacebookLoginButton.Models;
using System.Data.Entity;

namespace FacebookLoginButton.DAL
{
    public class FacebookUserDBInitializer : DropCreateDatabaseIfModelChanges<FacebookUserDBContext>
    {
        protected override void Seed(FacebookUserDBContext context)
        {
            var users = new List<FacebookUser>
            {
                new FacebookUser { id = "1115544823",   name = "Sahaj Saini",     email = "",    first_name = "Sahaj", 
                                            last_name = "Saini",     gender = "",    username = "sahaj.saini" },
                new FacebookUser { id = "1951933",   name = "Puneet Sahani",     email = "",    first_name = "Puneet", 
                                            last_name = "Sahani",     gender = "",    username = "" },
                new FacebookUser { id = "8608465",   name = "Ellen Nordahl",     email = "",    first_name = "Ellen", 
                                            last_name = "Nordahl",     gender = "",    username = "" },
                new FacebookUser { id = "500426320",   name = "Julia Maria John",     email = "",    first_name = "Julia", 
                                            last_name = "John",     gender = "",    username = "" }
            };
            users.ForEach(s => context.Users.Add(s));
            context.SaveChanges();
        }
    }
}